//Type here your validation function
//Use elemValue as a value of your validated element
//    neededValue as a value to compare with elemValue
//Function must returns true if validation is not successful
//                      false otherwise
function email() {
    var regExp = /^[a-zA-Z0-9](([a-z0-9\-_\+\&\.]?)+[a-z0-9])?\@((\w([a-zA-Z0-9\-_]+\w)?\.[a-z]{2,4})|(([01]?\d\d|2[0-4]\d|25[0-5])\.([01]?\d\d|2[0-4]\d|25[0-5])\.([01]?\d\d |2[0-4]\d|25[0-5])\.([01]?\d\d|2[0-4]\d|25[0-5]))|(localhost))$/i;
    if (!regExp.test(elemValue)) {
        return true;
    } else {
        return false;
    };
};

function getErrorMessage() {
    //Type here default error message for this validator. It's could be replaced
    //by validation options for every used element.
    //You can use %value% to place a current value of validated element
    //You can use %neededValue% to place a neededValue
    var messages = {"en" : "Enter valid email.",
                    "ru" : "Введите валидный email."};
    messages = $.extend(messages, messagesCur);

    return messages[locale];
};


